<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        /* 基本重置 */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Arial', sans-serif;
            background-color: #f5f5f5;
            color: #333;
            line-height: 1.6;
        }

        #app {
            max-width: 1200px;
            margin: 0 auto;
            padding: 30px;
            background-color: #ffffff;
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
            border-radius: 8px;
        }

        h1, h2, h3 {
            color: #333;
            margin-bottom: 20px;
        }

        a {
            text-decoration: none;
            color: #007BFF;
            transition: color 0.3s ease;
        }

        a:hover {
            color: #0056b3;
        }

        nav {
            margin-bottom: 30px;
            display: flex;
            justify-content: space-between;
        }

        nav a {
            display: inline-block;
            margin-right: 10px;
            padding: 10px 20px;
            border: 1px solid #e0e0e0;
            border-radius: 5px;
            background-color: #f9f9f9;
            transition: background-color 0.3s ease, color 0.3s ease;
        }

        nav a:hover {
            background-color: #007BFF;
            color: #ffffff;
            border-color: #007BFF;
        }

        .router-view {
            background-color: #f9f9f9;
            padding: 20px;
            border-radius: 8px;
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
            margin-bottom: 20px;
        }

        .router-view h1 {
            margin-bottom: 15px;
        }

        .router-view a {
            display: block;
            margin-bottom: 10px;
            padding: 10px 20px;
            border: 1px solid #e0e0e0;
            border-radius: 5px;
            background-color: #f1f1f1;
            transition: background-color 0.3s ease, color 0.3s ease;
        }

        .router-view a:hover {
            background-color: #007BFF;
            color: #ffffff;
            border-color: #007BFF;
        }

        /* 响应式设计 */
        @media (max-width: 768px) {
            nav {
                flex-direction: column;
                align-items: center;
            }

            nav a {
                margin-right: 0;
                margin-bottom: 10px;
            }
        }
    </style>
</head>
<body>
    <div id="app">
        <router-view></router-view>
    </div>
    <template id="dsh">
        <div>
            <h1>董事会</h1>
            <router-link to="/dsh/scjl">市场经理</router-link>
            <router-link to="/dsh/rsjl">人事经理</router-link>
            <router-link to="/dsh/cpjl">产品经理</router-link>
            <router-view></router-view>
        </div>
    </template>
    <template id="scjl">
        <div>
            <!--  -->
            <h1>市场经理</h1>
            <router-link to="/dsh/scjl">市场部</router-link>
            <router-link to="/dsh/scjl/sjb">设计部</router-link>
            <router-link to="/dsh/scjl">业务部</router-link>
            <router-link to="/dsh/scjl/kfb">客服部</router-link>
            <router-view></router-view>
        </div>
    </template>
    <template id="rsjl">
        <div>
            <h1>人事经理</h1>
            <router-link to="/dsh/rsjl">财务部</router-link>
            <router-link to="/dsh/rsjl">行政部</router-link>
            <router-link to="/dsh/rsjl">人力资源部</router-link>
            <router-view></router-view>
        </div>
    </template>
    <template id="cpjl">
        <div>
            <h1>产品经理</h1>
            <router-link to="/dsh/cpjl">网络部</router-link>
            <router-link to="/dsh/cpjl/kfb">开发部</router-link>
            <router-link to="/dsh/cpjl">技术部</router-link>
            <router-view></router-view>
        </div>
    </template>
    <template id="sjb">
        <div>
            <h1>设计部</h1>
            <router-link to="/dsh/scjl/sjb">设计一部</router-link>
            <router-link to="/dsh/scjl/sjb">设计二部</router-link>
        </div>
    </template>
    <template id="kfb">
        <div>
            <h1>客服部</h1>
            <router-link to="/dsh/scjl/kfb">客户服务</router-link>
            <router-link to="/dsh/scjl/kfb">技术支持</router-link>
        </div>
    </template>
    <template id="kfb">
        <div>
            <h1>开发部</h1>
            <router-link to="/dsh/cpjl/kfb">开发一部</router-link>
            <router-link to="/dsh/cpjl/kfb">开发二部</router-link>
        </div>
    </template>
</body>
</html>

<script type="module">
    import {} from './js/vue.js';
    import {} from './js/vue-router.js';
    var dsh = {
        template:'#dsh'
    }
    var scjl = {
        template:'#scjl'
    }
    var rsjl = {
        template:'#rsjl'
    }
    var cpjl = {
        template:'#cpjl'
    }
    var sjb = {
        template:'#sjb'
    }
    var kfb = {
        template:'#kfb'
    }
    var kfb = {
        template:'#kfb'
    }
    var router = new VueRouter({
        routes:[
            // 展示三个经理
            {path:'/',component:dsh,children:[
                // 展示市场经理
                {path:'/dsh/scjl',component:scjl,children:[
                    // 展示设计部
                    {path:'/dsh/scjl/sjb',component:sjb},
                    // 展示客服部
                    {path:'/dsh/scjl/kfb',component:kfb},
                ]},
                // 展示人事经理
                {path:'/dsh/rsjl',component:rsjl},
                // 展示产品经理
                {path:'/dsh/cpjl',component:cpjl,children:[
                    {path:'/dsh/cpjl/kfb',component:kfb}
                ]},
            ]},
            
        ]
    })
    
    new Vue({
        el:'#app',
        data:{
            msg:'hello vue'
        },
        methods:{
            // 自定义方法
        },
        computed:{
            // 计算属性
        },
        router
    })
</script>